// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.audio;

import gnu.trove.list.array.TLongArrayList;

public class FMODLocalParameter extends FMODParameter {
    private final TLongArrayList m_instances = new TLongArrayList();

    public FMODLocalParameter(String name) {
        super(name);
        if (this.getParameterDescription() != null && this.getParameterDescription().isGlobal()) {
            boolean _boolean = true;
        }
    }

    @Override
    public float calculateCurrentValue() {
        return 0.0F;
    }

    @Override
    public void setCurrentValue(float value) {
        for (int _int = 0; _int < this.m_instances.size(); _int++) {
            long _long = this.m_instances.get(_int);
            fmod.javafmod.FMOD_Studio_EventInstance_SetParameterByID(_long, this.getParameterID(), value, false);
        }
    }

    @Override
    public void startEventInstance(long inst) {
        this.m_instances.add(inst);
        fmod.javafmod.FMOD_Studio_EventInstance_SetParameterByID(inst, this.getParameterID(), this.getCurrentValue(), false);
    }

    @Override
    public void stopEventInstance(long inst) {
        this.m_instances.remove(inst);
    }
}
